Skip to content

Adds directional windshear across a MAUL#2146

Open
David Flack (daflack) wants to merge 7 commits into
MAUL_windspeed_propertiesfrom
MAUL_directional_windshear_properties_1962
Open

Adds directional windshear across a MAUL#2146
David Flack (daflack) wants to merge 7 commits into
MAUL_windspeed_propertiesfrom
MAUL_directional_windshear_properties_1962

Conversation

@daflack

@daflack David Flack (daflack) commented May 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #1962

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Ensure rose-suite.conf.example has been updated if new diagnostic added.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

@daflack David Flack (daflack) self-assigned this May 19, 2026
@daflack David Flack (daflack) linked an issue May 19, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Coverage

@daflack

Copy link
Copy Markdown
Contributor Author

Note comment on #2140 about refactoring and optimization being made in #2114 - like #2140 have not run in workflow, but code produces sensible results when testing.

@jwarner8 James Warner (jwarner8) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and methods look scientifically grounded. I haven't run the diagnostic myself, as don't have any appropriate data to test with.
Most comments minor, mostly just increasing explainability of tests/some bits of the code, so its easier for those not familiar to be able to understand.

].data
)
elif (
len(number_of_MAULs.coord("realization").points)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this general code block could do with some single line comments, as its quite hard to follow what's happening

The relative humidity is linearly interpolated onto the same grid as the vertical
derivative of the equivalent potenital temperature. The masks for each criterion are multiplied
together and then image processing is used to identify the number of objects (values of
ones that are connected) the depth of each object is found the deepest MAUL is used. The

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ones that are connected) the depth of each object is found the deepest MAUL is used. The
ones that are connected) where(?) the depth of each object is found the deepest MAUL is used. The

def test_maul_properties_direction_shear_cubelist(
maul_mask, u_wind_maul, v_wind_maul, precalc_direction_shear
):
"""Ensure correct directional shear across maul in cubelist."""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this test be explained a bit more in docstring/comments?

Comment thread tests/conftest.py Outdated
Comment thread tests/conftest.py Outdated
Comment thread tests/conftest.py Outdated
Comment thread tests/conftest.py Outdated
Comment thread tests/conftest.py Outdated
Co-authored-by: James Warner <62252918+jwarner8@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MAUL properties: windshear

2 participants